-- GENERATED SPELL FOR [Nivara Bladedancer] --


function spell0_30580(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(16856,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30580', 5330, 1)
end

function spell1_30580(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_30580', 552, 1)
end

function spell2_30580(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(13736,pUnit)
pUnit:RegisterEvent('Sorts_30580', 2000, 1)
end

function Sorts_30580(pUnit, Event)
local choix_sorts_30580 = math.random(0, 2)
if choix_sorts_30580 == 0 then
pUnit:RegisterEvent('spell0_30580', 1, 1)
end
if choix_sorts_30580 == 1 then
pUnit:RegisterEvent('spell1_30580', 1, 1)
end
if choix_sorts_30580 == 2 then
pUnit:RegisterEvent('spell2_30580', 1, 1)
end
end

function mob30580_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30580', math.random(1500, 3000), 1)
end

function mob30580_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30580_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30580_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30580, 1, 'mob30580_Action')
RegisterUnitEvent(30580, 2, 'mob30580_Leave')
RegisterUnitEvent(30580, 3, 'mob30580_Kill')
RegisterUnitEvent(30580, 4, 'mob30580_Die')
